<?php // no direct access
defined('_JEXEC') or die('Restricted access'); 

// Catturo voce menù collegata
$anchorMenu = $mainframe -> getMenu() -> getItem($params -> get("itemid"));

if($list) {
?>

<div class="separatore"></div>
<div class="inner-list">
	<?php 
	echo "<h3><a href=\"" . $anchorMenu -> link . "&Itemid=" . $params->get('itemid') . "\">" . $module -> title . "</a></h3>";
	foreach ($list as $index => $item) :
		$addCss = ($index == count($list) - 1) ? " class=\"last\"": "";
		?>  
		<p<?php echo $addCss?>>
		<span class="createdate">
			<?php if($item->params->get("expiry")) {?>
				<?php echo "dal " . JHTML::_('date', $item->row->created, JText::_('DATE_FORMAT_LC4')) ?>
				&nbsp;&nbsp;&nbsp;
				<?php echo "al " . JHTML::_('date', $item->params->get("expiry"), JText::_('DATE_FORMAT_LC4')) ?>
			<?php } else {?>
				<?php 
				echo JHTML::_('date', $item->row->created, JText::_('DATE_FORMAT_LC4')) 
				?>
			<?php }?>
		</span><br/>
		<a href="<?php echo $item->link; ?>&amp;layout=extra">
			<strong><?php echo $item->title ?></strong>
		</a><br/>
		<?php 
		$text = strip_tags($item->text);
		echo $text . "<br/>";
		?>
		<a href="<?php echo $item->link; ?>&amp;layout=extra" class="forward"><?php echo JText :: _ ("readmore") ?></a>
		</p> 
		<?php
	endforeach; 
	?>
</div>

<?php
}